package kernel;

import java.util.Vector;

public class Rail extends Arc {
    
    /**
     * @attribute
     */
    Vector <Chariot> listChariot = new Vector<Chariot>();
	
    /*
     * Constructeur de la classe Rail
     */ 
    public Rail(Noeud noeudfin, int longueur, int id, Noeud noeudDeb) {
        super(noeudfin, longueur, id, noeudDeb);
    }
    
    /*
     * Getters & Setters
     */
    public void setListChariot(Vector<Chariot> listChariot) {
        this.listChariot = listChariot;
    }

    public Vector<Chariot> getListChariot() {
        return listChariot;
    }
    
    public void AjouterChariot(Chariot chariot){
        listChariot.add(chariot);
    }
    
    public void EnleverChariot(Chariot chariot){
        listChariot.remove(chariot);
    }
}
